import React, { PureComponent } from 'react';
import { Select } from 'antd';
import { generateSelect, showValue } from './utils';

export default class EnumSelect extends PureComponent {
  state = {
    logic: {},
    value: {},
  };

  render() {
    const { title, key, logicSelect, valueSelect, dictMap } = this.props;
    const that = this;
    const logicSelectP = {
      style: { width: '70px', marginLeft: '20px' },
    };
    const valueSelectP = {
      style: { width: '150px', marginLeft: '20px' },
    };
    return (
      <div>
        <p style={{ float: 'left', color: '#798299', fontSize: '14px', fontWeight: 'bold', marginLeft: '40px' }}>{title}</p>
        <Select {...logicSelectP}>{generateSelect(logicSelect, dictMap)}</Select>
        <Select {...valueSelectP}>{generateSelect(valueSelect, dictMap)}</Select>
      </div>
    );
  }
}
